#!/bin/sh

set -e

FIFO="/var/run/sipwitch/control"

if [ ! -z "$ADDRFAM" ] && [ "$ADDRFAM" != inet ] && [ "$ADDRFAM" != inet6 ]; then
		exit 0 ; fi

if [ -p $FIFO ] ; then
	echo "ifdown $IFACE" >$FIFO ; fi

exit 0

